home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 235 / 235.d81 / mystic castle_64 (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  26KB  |  433 lines

  1. 0 vic=53248:poke2040,11:poke2041,13:poke2042,14:poke2043,15:forx=704to767:reada:pokex,a:next:forx=832to1021:reada:pokex,a:next:print"mystic castle v1.20 by paul panks"
  2. 1 data252,7,239,130,8,41,189,23,170,82,169,69,81,81,66,84,165,65,54,77,128,53,21
  3. 2 data128,44,166,128,44,70,128,74,10,64,85,181,65,69,20
  4. 3 data66,186,11,165,124,7,203,0,0,22,192,0,45,191,255,250,95,255,244,32,0,8,31,255,240,0
  5. 4 data63,7,192,21,10,160,143,27,176,205,20,80,171,20,32,85,26,0,165,21,0,86,202,128,45,133,64,90,131,32
  6. 5 data 182,131,96,107,67,160,210,189,96,161,65,64,64,190,128,128,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  7. 6 data127,239,240,86,165,160,105
  8. 7 data98,64,77,35,64,11,2,192
  9. 8 data75,34,192,109,99,64,93,171,80,75,38,224,91,170,208,109
  10. 9 data99,64,77,35,64,11,2,192,18,130,192,36,69,32,127,239,240,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  11. 10 data 63,192,0,94,32,0,173,240
  12. 11 data0,210,208,0,215,48,0,176,16,0,180,0,0,204,0,0,212,0,0,208,0,0,176,0,0
  13. 12 data176,48,0,183,24,0,210,168,0,205,216,0,126,240,0,63,224,0,0,0,0,0,0,0,0,0,0,0,0
  14. 18 poke53280,0:poke53281,0:printchr$(14)"[147]"
  15. 19 printchr$(14)"[147]"
  16. 20 gosub250
  17. 21 dimvb$(19),wd$(26),rn$(36),de$(76),m(36,6),lo(62),ob$(62),ex$(62),re$(15),dy,rm,tm$,hp,hm,ex,ct,gp,hv,ev,fv,dv,si,x,i,a$,ry$,z$:hr=6:m=0
  18. 22 tm$="[211]unrise":gp=150:dim ao$(62):rm=1:gosub197:printchr$(14)chr$(8)""spc(13)"[208]lease wait"
  19. 23 forx=1to76:readde$(x):nextx:forx=1to14:readre$(x):nextx:gosub242:print"[147]":gosub215
  20. 24 print"[147][193]re you playing a saved game?";:gosub202:ifry$="y"orry$="[217]"thenrm=1:h=200:hp=200:gp=300:ep=.:ct=0:dy=0:goto29
  21. 25 h=200:hp=200:gp=300:ep=.:ct=0:dy=0:print"[147][206]ew character[146]":print:print"[197]nter your character's name below:"
  22. 26 gosub 61:iflen(z$)>16thenprint"[195]haracter name exceeds maximum!":gosub197:goto25
  23. 27 na$=z$:pn$=z$:print"[215]hat would you like to be known as?     (i.e. [199]eoff the [194]rave[146]):"
  24. 28 gosub 61:kn$=z$:print:print"[206]ow enter an alignment:":print"[204][146]awful,[195][146]aotic,[206][146]eutral":gosub194:al$=ry$:goto207
  25. 29 printchr$(14)"[147][195]ontinue [211]aved [199]ame[146]":print:dk$="d":k$="0":print"[201]nsert disk...":print"[200]it [211][208][193][195][197] [194][193][210][146], or q[146] to abort.":gosub194:ifry$="q"thenclr:run
  26. 30 print
  27. 31 si=0:input"[212]itle    [157]*[157][157][157]";lt$:gosub200:iflt$="*"orsi=1then31
  28. 32 open2,8,2,"0:"+lt$+",s,r":forx=7to62:input#2,lo(x):next
  29. 33 input#2,rm:input#2,ct:input#2,ep:input#2,gp:input#2,h:input#2,hp:input#2,pn$:input#2,kn$:input#2,al$:close2:goto35
  30. 34 ct=1:lo(7)=-1:dy=0:tm$="[211]unrise":m=0:pm=0:am=1
  31. 35 lo(55)=9:print"[147]":poke53280,0:poke53281,0:gosub250:gosub257:gosub63000:print:print"[207]bjects present here:":print:si=0:forx=7to60:iflo(x)=rmthenprintob$(x):si=1
  32. 36 next:gosub240:print"[207]bvious exits:":print:forx=1to6:ifm(rm,x)>0thenprintob$(x)"  ";
  33. 37 next:print
  34. 38 ob$(24)="canteen":ex$(52)="[212]his is [205]ordimar!--[197]vil of the [193]ncients![217]ou sense great power flowing through   him!"
  35. 39 rem main loop
  36. 40 gosub199:n=0:v=0:z$="":print">";:gosub61:forx=1to25:wd$(x)="":next:gosub224:dy=dy+1:ifz$="help"thengoto243
  37. 41 y=1:wa=1:forx=1tolen(z$):ifmid$(z$,x,1)=" "theny=x:wd$(wa)=left$(z$,y-1):wa=wa+1:wd$(wa)=mid$(z$,y+1,x+1)
  38. 42 next:wd$(wa)=mid$(z$,y+1,x+1):ifz$="graphic"orz$="help"orz$="[133]"ora$="help"thengoto243
  39. 43 ifz$="list"andrm=9thengosub385:goto40
  40. 44 ifz$="i"orz$="inv"orz$="inve"orz$="inven"orz$="in"orz$="inventory"orz$="stat"orz$="stats"orz$="statistics"orz$="vitals"thengoto54
  41. 45 vb$(1)="go":vb$(2)="get":vb$(3)="take":vb$(4)="drop":vb$(5)="wield":vb$(6)="unwield":vb$(7)="wear":vb$(8)="remove":vb$(9)="buy":vb$(10)="sell":vb$(11)="eat"
  42. 46 vb$(12)="drink":vb$(13)="examine":vb$(14)="read":vb$(15)="light":vb$(16)="extinguish":vb$(17)="climb":vb$(18)="use":vb$(19)="kill":ifz$="quit"thengoto298
  43. 47 ifz$="l"orz$="look"orz$="view"thengoto35
  44. 48 forx=1to19:ifvb$(x)=wd$(1)thenv=x
  45. 49 next:forx=1to60:ifob$(x)=wd$(2)orao$(x)=wd$(2) then n=x
  46. 50 next:ifv=0thenprint"[214]erb not recognized. [212]ype help[146]":print"for the game vocabulary.":goto40
  47. 51 ifn=0thenifwd$(1)<>"examine"andwd$(1)<>"read"andwd$(1)<>"climb"thenprintre$(4):goto40
  48. 52 gosub224:onvgoto70,77,87,89,97,103,106,110,113,122,128,133,139,144,149,153,156,160,168
  49. 53 print"[207]k.":goto40
  50. 54 ifct=0thenprint"[217]ou are empty handed.":goto40
  51. 55 print"[217]ou are carrying:":wd=0:ct=0:wo=0:forx=7to60:iflo(x)=-1thenprint"  "ob$(x)".":ct=ct+1
  52. 56 iflo(x)=108thenprint"  "ob$(x)" (wielded).":wd=1:ct=ct+1
  53. 57 iflo(x)=205thenprint"  "ob$(x)" (worn).":ct=ct+1:wo=wo+1
  54. 58 iflo(x)=405thenlt=1:print"  "ob$(x)" (lit[146])":ct=ct+1
  55. 59 next:ifwo>0thenprint"[217]our armor is protecting"wo*30"%":print"of your body."
  56. 60 goto40
  57. 61 z$=""
  58. 62 a=20:z=1:z$="a":print"[164][157]";:a$="":poke198,0
  59. 63 getz$:ifz$=""thena$="help":z=13:z$=chr$(13)
  60. 64 ifz$="[145]"orz$="[157]"orz$="[147]"orz$=""orz$=""then63
  61. 65 z=asc(z$):zl=len(a$):ifzl>athen67
  62. 66 ifz>31thena$=a$+z$:printz$"[164][157]";:goto63
  63. 67 ifz=13andzlthenprint" ":z$=a$:a$="":return
  64. 68 ifz=20andzlthena$=left$(a$,zl-1):print " [157][157][164][157]";
  65. 69 goto63
  66. 70 ifn>6thenprintre$(1):goto40
  67. 71 ifm(rm,n)=0thenprintre$(8):goto40
  68. 72 ifn=4andrm=31theniflo(52)=rmthenprint"[217]our path is":print"blocked by "ob$(52)"!":goto40
  69. 73 ifn=1andrm=33theniflo(58)=rmthenprint"[217]our path is":print"blocked by "ob$(58)"!":goto40
  70. 74 ifm(rm,n)>13andm(rm,n)<21orm(rm,n)>31theniflt=0thenprint"[201]t's too dark to move!":print"[198]ind a torch or lantern...":goto40
  71. 75 ifrm=11andn=1thenprintre$(3):goto40
  72. 76 rm=m(rm,n):gosub197:goto35
  73. 77 iflo(n)<>rmtheniflo(n)<>-1andlo(n)<>105andlo(n)<>205andlo(n)<>405thenprintre$(11)ob$(n):goto40
  74. 78 iflo(n)=-1orlo(n)=108orlo(n)=205orlo(n)=405thenprintre$(2)ob$(n):goto40
  75. 79 ifn<6thenprintre$(12):goto40
  76. 80 ifn=34orn=35orn>45thenprintre$(13)ob$(n):goto40
  77. 81 mx=8:iflo(9)=-1orlo(9)=205thenmx=16
  78. 82 iflo(18)=-1thenmx=12
  79. 83 iflo(19)=-1thenmx=14
  80. 84 ifct>=mx then print"[212]oo heavy. [217]ou'll need to drop":print"some weight.":goto40
  81. 85 ifn=8andlo(24)<>-1thenprint"[217]ou need something to put it in first.":goto40
  82. 86 lo(n)=-1:ct=ct+1:print"[207]k.":goto40
  83. 87 rem take
  84. 88 goto77
  85. 89 rem drop
  86. 90 iflo(n)=-1thenprint"[207]k, dropped...":lo(n)=rm:ct=ct-1:goto40
  87. 91 iflo(n)=108orlo(n)=205orlo(n)=405thenprint"[201]t must be carried to be dropped.":goto40
  88. 92 ifn=33andrm=36andlo(35)=rmthenprint"[199]omar thanks you.":gosub197:print"[200]e says,'[198]or your kindness, [201] shall     increase your vitality.'":gosub197:hp=hp+200:h=hp:goto94
  89. 93 printre$(5)ob$(n):goto40
  90. 94 iflo(n)=-1thenct=ct-1:lo(n)=1035
  91. 95 iflo(n)=205thenlo(n)=-1:ct=ct-1:lo(n)=1035:wo=wo-1
  92. 96 goto40
  93. 97 rem wield
  94. 98 iflo(n)=108thenprint"[201]t's already being wielded!":goto40
  95. 99 iflo(n)=205thenprint"[217]ou are wearing that. [201]t cannot":print"be wielded.":goto40
  96. 100 iflo(n)<>-1thenprintre$(5)ob$(n):goto40
  97. 101 ifn>26andn<33orn>35andn<40thenifwd=0thenlo(n)=108:wd=1:print"[207]k.":goto40
  98. 102 print"[212]hat cannot be wielded.":goto40
  99. 103 rem unwield
  100. 104 iflo(n)=108thenlo(n)=-1:wd=0:print"[207]k.":goto40
  101. 105 printre$(5)ob$(n):goto40
  102. 106 rem wear
  103. 107 iflo(n)<>-1thenprintre$(11):goto40
  104. 108 ifn=9orn=11orn=26orn=33thenlo(n)=205:print"[207]k.":wo=wo+1:goto40
  105. 109 print"[212]hat cannot be worn.":goto40
  106. 110 rem remove
  107. 111 iflo(n)=205thenlo(n)=-1:wo=wo-1:print"[217]ou remove "ob$(n)".":goto40
  108. 112 printre$(11):goto40
  109. 113 mx=8:iflo(9)=-1orlo(9)=205thenmx=16
  110. 114 iflo(18)=-1thenmx=12
  111. 115 iflo(19)=-1thenmx=14
  112. 116 ifrm<>9thenprint"[217]ou can't do that here!":goto40
  113. 117 iflo(55)=998thenprint"[212]he clerk isn't here.":goto40
  114. 118 iflo(n)=75thengosub406:ifgp=>pandp<>0andct<mxthengp=gp-p:ct=ct+1:lo(n)=-1:print"[212]he clerk says,'[212]hank you.'":goto40
  115. 119 ifgp<pthenprint"[212]he clerk shakes his head.":print"[200]e says,'[217]ou don't have enough gold.'":goto40
  116. 120 ifct>=mxthenprint"[217]ou are carrying too much weight.":goto40
  117. 121 print"[212]he clerk says,'[211]orry. [201] can't do that.'":print"[199]old:[146]"gp:goto40
  118. 122 rem sell
  119. 123 ifrm<>9thenprint"[217]ou can't do that here!":goto40
  120. 124 iflo(55)<>rmthenprint"[212]he clerk isn't here.":goto40
  121. 125 iflo(n)=205orlo(n)=108thenprint"[212]he clerk says,'[217]ou'll need to unequip":print"that first.'":goto40
  122. 126 iflo(n)<>-1th